Thank you for choosing OneUI!
We are very excited to release OneUI 5 version as a free update to all of you who supported the project all these years and keep supporting it with new purchases. It's our way of thanking you for choosing one of our templates for your projects. We hope you like it and put it into good use by building new awesome projects. Wish you all the best and happy coding! đđ
Changelog
New Features
- Laravel 9 Starter Kit
- Font Awesome 6 (105 new icons)
- Checkout Page
- Installation Page
- Responsive DataTables
- Email validation with dot rule
Improvements
- Replaced sass with sass-embedded for faster compilation times
- Improved header overlay visibility
Fixes
-
template.jsforEach is not a function error
Updates
- Bootstrap 5.1.3 (5.1.1)
- @popperjs/core 2.11.2 (2.10.1)
- Font Awesome 6.0.0 (5.15.4) - 105 New Icons
- FullCalendar 5.10.1 (5.9.0)
- @ckeditor/* 32.0.0 (29.2.0)
- CKEditor4 4.17.1 (4.16.2)
- Chart.js 3.7.0 (3.5.1)
- DataTables 1.11.4 (1.11.2)
- DataTables Buttons 2.2.2 (2.0.0)
- Dropzone 5.9.3 (5.9.2)
- Pdfmake 0.2.4 (0.2.2)
- Raty JS 3.1.1 (3.0.0)
- SweetAlert2 11.4.0 (11.1.5)
- SimpleBar 5.3.6 (5.3.5)
- Laravel Starter Kit: Laravel 9.0 (8.60.0)
New Features
- Mega menu
- Vertical tabs
- Block form controls
- DataTables official BS5 Integration + excel/pdf button examples
-
remember-themeclass in#page-containernow also remembers dark mode preference
Improvements
- Various style improvements
- Color theme support for custom form controls
- Better dark theme support for custom form controls and other components
- Form switch design
- Full Calendar theming
- Font Awesome Pro Icons support in DataTables
Fixes
- 'jq-notify' helper fixed when using it through custom JS
- Small visual glitches in landing page examples
- Main navigation submenu click (now correctly prevents default behavior on click)
Updates
- Bootstrap 5.1.1 (5.0.1)
- @popperjs/core 2.10.1 (2.9.2)
- Font Awesome 5.15.4 (5.15.3) - 8 new icons
- FullCalendar 5.9.0 (5.7.2)
- CropperJS 1.5.12 (1.5.11)
- @ckeditor/* 29.2.0 (28.0.0)
- CKEditor 4.16.2 (4.16.1)
- DataTables 1.11.2 (1.10.25)
- DataTables Buttons 2.0.0 (1.7.1)
- SweetAlert2 11.1.5 (11.0.16)
- SimpleBar 5.3.5 (5.3.3)
- Laravel Starter Kit: Laravel 8.60.0 (8.46.0)
Changes
- 'es6-promise' plugin was removed and no longer used with SweetAlert2
- Chart.js JS asset path was updated and its name is now in lowercase
- DataTables CSS/JS asset paths are updated/changed
-
SCSS: Removed
$headings-colorfromcolor-theme-dark()mixin
5.0 Release
Updating
OneUI will receive free updates in the future. One of the main goals was to make sure the update progress is going to be as easy as possible. Due to its nature (template), updating can become an unpleasant task.
Therefore weâve tried to make it as easy as possible to let you apply your own overrides (in case you would
like to) to both Sass (_scss/) or JavaScript (_js/) files without altering the
original files. Please check Sass and JavaScript section for more info!
In general, the following core folders/files will have to be updated with each update:
HTML/PHP Versions
-
assets/css/-
themes/* -
oneui.css -
oneui.min.css
-
-
assets/js/-
lib/* -
plugins/* -
oneui.app.min.js
-
-
assets/fonts/*
Laravel Starter Kit (run the commands npm install and npm run dev after updating with
the new files)
-
public/js/-
lib/* -
plugins/*
-
-
public/fonts/* -
resources/-
js/oneui/modules/* -
sass/*Except
custom/folder where you can make your own modifications
-
-
webpack.mix.jsPlease make sure you donât override any custom additions you might have introduced
-
package.jsonPlease make sure you donât override any custom packages you might have installed
-
package-lock.json
If you are working with source files (Sass and/or ES6), you will have to update the following as well:
HTML/PHP Versions
-
assets/_js/main/modules/* -
assets/_scss/*Exceptcustom/folder where you can make your own modifications
Moreover, if you are using Gulp tasks, remember to update the following files in your projectâs root folder
and then run the command npm install from your console to install/update any new dependencies:
HTML/PHP Versions
-
.babelrc -
gulpfile.babel.js -
package.json -
package-lock.json
Remember that itâs always a good idea to backup your work before updating to a new version!
When a new update becomes available, you will be able to download it from Themeforest. You can check the checkbox under the product ( Get notified by email if this item is updated), follow us on Twitter or subscribe to our news to stay up to date about the availability of new updates.
Package
OneUI was built with extra care based on the valuable feedback we keep receiving over the past years working full-time on dashboard templates. It follows the best practices using the latest technologies and we really hope that you will enjoy working with it. OneUI will enable you to build fast, beautiful, user friendly web applications and websites that will work seamlessly across various screens and devices.
Let's have a look at the contents of the current package:
-
01 - OneUI Source (HTML)Includes the abstract HTML version. This version can be used with any server side language/framework you prefer or currently working with. -
02 - OneUI Source (PHP)Includes the abstract PHP version. This version can come really handy as a starting point if you would like to build a custom PHP application. It can help you in many ways:-
It enables you to change various options of the layout just by
updating the main variables found in
src/inc/_global/config.php. The backend section has also its own folder with its own config file which can be used to overwrite the main variables of your choice for the pages in that section. For example, the extra config file for all backend pages (be_*.php) can be found insrc/inc/backend/config.php. -
It uses basic templating for separating common used code
(header, sidebar, footer etc). The main views which are used in every page can be found in
src/inc/_global/views/*. The backend section has its own folder with its own views which can be used for common code, used only in the pages in that section. For example, the extra views for all backend pages (be_*.php) can be found insrc/inc/backend/views/*. - It features a recursive function that can build main navigation on the fly (with as many levels as you like) from a multidimensional array you can set in the config file of each section.
-
It features various functions that can populate your pages with
dummy content for testing and showcasing purposes
src/inc/_classes/Template.php - In general, this version can also give you a good idea of how you could implement your own templating in the language/framework of your choice.
-
It enables you to change various options of the layout just by
updating the main variables found in
-
03 - OneUI Source (Laravel Starter Kit)If you are using Laravel to build your next project, then this starter kit is the perfect fit. It features a clean Laravel installation with all OneUI assets ready to work with Laravel Mix and a few example pages to get you started. You can either take the parts you want and integrate them into your current project or you can run the following commands to install all dependencies and start building with Laravel like you would normally do.-
composer install && npm install && php artisan key:generate
Afterwards, you can use the following Laravel commands you already now and love:-
php artisan serve
Serves your project -
npm run watch
Watches your files and compiles your assets on the fly (also auto reloads your browser) -
npm run dev
Compiles your assets -
npm run prod
Compiles and prepares your assets for production
Please have in mind that you have to already be familiar with Laravel to use this version. If you are interested in learning Laravel, you can have a look at the official documentation. If you would like to use OneUI in your existing Laravel installation or replicate any page from the full HTML version, please have a look at the Laravel Starter Kit section for more info. -
-
DocumentationOf course, it includes current documentation!
You donât have to use Node.js or Gulp with the template if you don't like.
You can ignore .babelrc, gulpfile.babel.js, package.json and
package-lock.json and work directly with the files found in the src/ folder of
each version. In that case, you won't be able to take advantage of our premade tasks and if for example you
would like to work with and compile the Sass/ES6 files, you will just have to use your own compiling method
or tasks. Alternatively, you can just use the minimized production ready files (which are used by default in
all pages) and work as usual.
Bootstrap
Bootstrap is the world's most popular front-end component library. It is easy to use and offers a large variety of CSS as well as JavaScript components. OneUI uses this framework at its core and builds on top its unique layout and features. It redesigns/extends the original components and introduces new ones, featuring a modern and clean design.
If you are unfamiliar with the framework, its official website will help you out a lot but if you just want to start quickly, you can easily replicate any feature or component we already present in OneUI pages. If you find a feature in the official Bootstrap Docs you would like to use, feel free to, since they are all available in OneUI.
Gulp Tasks
Gulp is a JavaScript Task Runner. It enables you to automate repetitive tasks like minification, compilation, unit testing, linting, etc, which makes your life easier.
In OneUI, we've created many Gulp tasks which take care of everything for you! They set up a web server which auto refreshes on file changes, compile on the fly your Sass and ES6 files into CSS and ES5 respectively and build your production ready project.
To use it with the template (HTML or PHP version), you will first have to:
-
Download and install Node.js
Prefer the LTS version just to make sure there won't be any incompatibilities
-
Install gulp-cli globally by running the command
npm install -g gulp-cliin your systemâs console. -
(Optional step for running the PHP web server for the PHP version) Make sure that you've installed PHP on your system and that PHP is included in
your system's PATH. You can try running
php --versionin your console to see if it is already installed. -
Install all required dependencies in your projectâs folder by running the command
npm installin your systemâs console - You will have to run it from your projectâs root folder which will have to includesrc/folder,.babelrc,gulpfile.babel.js,package.jsonandpackage-lock.jsonfiles.
After youâve successfully completed the previous steps, you will be able to run the following commands in your systemâs console from your projectâs root folder and start working:
| Command | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Main Tasks | |||||||||||||
gulp run-html
|
Sets up a custom static HTML Web server at http://localhost:3000 which auto refreshes when you update any vital file in the project. It also starts watching for changes in the Sass and ES6 files and auto recompiles them to CSS and ES5 respectively if there is a change. |
||||||||||||
gulp run-php
|
Sets up a custom PHP Web server at http://localhost:3000 which auto refreshes when you update any vital file in the project. It also starts watching for changes in the Sass and ES6 files and auto recompiles them to CSS and ES5 respectively if there is a change. |
||||||||||||
gulp build
|
It will prepare and build your custom, minimized and production ready OneUI project.
After it completes, you will be able to find it under a new |
||||||||||||
| Additional Tasks (on demand) | |||||||||||||
gulp css
|
Compiles from Sass to CSS (Autoprefixer auto adds required browser CSS prefixes).
|
||||||||||||
gulp js
|
Webpack bundles JS modules together and Babel compiles from ES6 to ES5:
|
||||||||||||
gulp js-dev
|
Webpack bundles JS modules together and Babel compiles from ES6 to ES5:
Webpack runs with development mode and produces development friendly files as well:
|
||||||||||||
gulp watch
|
It starts watching for changes in Sass and ES6 files and auto recompiles them to CSS and ES5
respectively if there is a change. Useful if you would like to run it separately since it
automatically runs when you use the |
||||||||||||
HTML
OneUI features a super flexible, smart and powerful layout which can be used to create dashboard and website pages with minimum effort using the same resources.
The layout offers many options which can be enabled just by adding or removing a class in the
#page-container element. If you play around with the PHP version, you will be able to set these
options from the src/inc/_global/config.php file.
Letâs have a quick look at the generic HTML structure and get familiar with the layout:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- Title and Meta -->
...
<!-- END Title and Meta -->
<!-- Icons -->
<!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
...
<!-- END Icons -->
<!-- Stylesheets -->
<!-- Page JS Plugins CSS go here -->
<!-- Fonts and OneUI framework -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap">
<link rel="stylesheet" id="css-main" href="assets/css/oneui.min.css">
<!-- You can include a specific file from css/themes/ folder to alter the default color theme of the template. eg: -->
<!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/amethyst.min.css"> -->
<!-- END Stylesheets -->
</head>
<body>
<!-- Page Container -->
<!--
Available classes for #page-container:
GENERIC
'remember-theme' Remembers active color theme and dark mode between pages using localStorage when set through
- Theme helper buttons [data-toggle="theme"],
- Layout helper buttons [data-toggle="layout" data-action="dark_mode_[on/off/toggle]"]
- ..and/or One.layout('dark_mode_[on/off/toggle]')
SIDEBAR & SIDE OVERLAY
'sidebar-r' Right Sidebar and left Side Overlay (default is left Sidebar and right Side Overlay)
'sidebar-mini' Mini hoverable Sidebar (screen width > 991px)
'sidebar-o' Visible Sidebar by default (screen width > 991px)
'sidebar-o-xs' Visible Sidebar by default (screen width < 992px)
'sidebar-dark' Dark themed sidebar
'side-overlay-hover' Hoverable Side Overlay (screen width > 991px)
'side-overlay-o' Visible Side Overlay by default
'enable-page-overlay' Enables a visible clickable Page Overlay (closes Side Overlay on click) when Side Overlay opens
'side-scroll' Enables custom scrolling on Sidebar and Side Overlay instead of native scrolling (screen width > 991px)
HEADER
'' Static Header if no class is added
'page-header-fixed' Fixed Header
HEADER STYLE
'' Light themed Header
'page-header-dark' Dark themed Header
MAIN CONTENT LAYOUT
'' Full width Main Content if no class is added
'main-content-boxed' Full width Main Content with a specific maximum width (screen width > 1200px)
'main-content-narrow' Full width Main Content with a percentage width (screen width > 1200px)
DARK MODE
'sidebar-dark page-header-dark dark-mode' Enable dark mode (light sidebar/header is not supported with dark mode)
-->
<div id="page-container">
<!-- Page loader -->
<!-- If #page-loader markup and also the "show" class is added, the loading screen will be enabled and auto hide once the page loads -->
<!-- <div id="page-loader" class="show"></div> -->
<!-- Side Overlay-->
<aside id="side-overlay">
...
</aside>
<!-- END Side Overlay -->
<!-- Sidebar -->
<nav id="sidebar">
...
</nav>
<!-- END Sidebar -->
<!-- Header -->
<header id="page-header">
...
</header>
<!-- END Header -->
<!-- Main Container -->
<main id="main-container">
...
</main>
<!-- END Main Container -->
<!-- Footer -->
<footer id="page-footer">
...
</footer>
<!-- END Footer -->
</div>
<!-- END Page Container -->
<!-- OneUI JS -->
<script src="assets/js/oneui.app.min.js"></script>
<!-- jQuery (Needed only if you would like to use a jQuery based plugin in your page) -->
<script src="assets/js/lib/jquery.min.js"></script>
<!-- Page JS Plugins + Page JS Code -->
</body>
</html>
As you can see, we kept the HTML structure as simple as possible, so we hope that you find it easy to
understand and implement in your own pages. Furthermore, have in mind that you can remove
#side-overlay, #sidebar, #page-header or #page-footer
markup if you would like to not have them in some of your pages. Everything will work as expected, just make
sure that you donât use any related classes (to the element you removed) in #page-container.
Sass
OneUI was built with Sass using the latest
SCSS syntax. It is a powerful CSS pre-processor which extends the CSS language, adding features
that allow variables, mixins, functions and many other techniques, enabling you to make CSS that is more
maintainable and extendable.
If you would like to extend the framework and add your own styles or UI components, feel free to use the Sass
files included in the source (HTML and PHP version) under src/assets/_scss/* folder. You can also
use the included Gulp tasks to auto compile to CSS every
time you make a change (any required browser prefixes will be auto added after compilation, so you donât have
to).
It is highly recommended though, to use the custom files we created for you to add your own styles and make
the updating process easier. They can be found in
assets/_scss/custom/. In assets/_scss/custom/_variables.scss you will be able to
override any variables you want and in assets/_scss/custom/_main.scss you will be able to add
your own styles or override current ones.
Letâs have a better look at the Sass files structure:
| Files | Description |
|---|---|
bootstrap/*
|
Includes all original unaltered Bootstrap 5 Sass files. The concept is to never touch those files, so that a framework update is possible. |
oneui/*
|
Includes all OneUI Sass files which follow the structure Bootstrap 5 uses. All Bootstrap 5 overrides can also be found in here (variables/mixins/styles). We basically override what we can (using the available Bootstrap 5 variables) or want (mixins) to match our needs. Then we override the styles we canât alter with variables and add our own components. This method allows us to easily update Bootstrap, resuse its features in our styles and also export a smaller main CSS file with fewer style overrides. |
vendor/*
|
Includes all third party styles (eg animation.css, fontawesome icons, simple line icons). In here, you will also find all style overrides for the integrated plugins. |
custom/*
|
This is your own folder in which you can add your own styles or overrides. Making your own changes in here will enable you to just update all other folders (when an update becomes available) without worrying of erasing your changes. |
main.scss
|
This file is compiled to the main CSS stylesheet |
JavaScript
OneUI custom JS functionality was built from scratch with ES6 (ECMAScript 2015). This enabled us to take advantage of many new features which weren't available in ES5 (the version most web browsers support and run) and write clean and more maintainable code.
We use webpack to bundle together separate JS files and Babel to compile ES6 to ES5. You can take advantage of
webpack and use it to also import plugins and libraries from the node_modules folder directly in
the custom code since all third party plugins used in OneUI will be installed with npm, too,
after running npm install.
ES6 JS code can be found under assets/_js/ folder. These files have to be compiled to ES5 first
before we include them in our pages and this is completely automated through the tasks we've created.
| Files | Description |
|---|---|
main/*
|
Vital libraries (Bootstrap + SimpleBar) and custom OneUI JS functionality used in all pages. If you would
like to add your own functionality or overrides, you can do so in
|
pages/*
|
Files with custom code showcasing various plugin examples. They are used separately only in specific pages. |
Please make sure that you donât use snippets from ES6 code directly in your pages since older browsers won't be able to run them.
Now, letâs have a better look at the JavaScript folder (assets/js/*) which includes the compiled
ES6 files as well as other JS resources:
| Files | Description |
|---|---|
lib/*
|
Third party optional libraries are included here. Currently only jQuery can be found and needs to be added only if you would like to use a jQuery based plugin in your page. The core JS functionality does not use it. |
plugins/*
|
All supported and integrated third-party plugins are included here. Some of them require from you to
add their stylesheet as well, in the page you would like to use them (always before
All those plugins will also be downloaded in |
pages/*
|
Custom JS code used in specific pages demonstrating the usage of various plugins and functionality.
These files are compiled from |
oneui.app.min.js
|
The main file containing all vital libraries (Bootstrap + SimpleBar) and custom JS code needed for OneUI features including
layout and blocks API. It also includes various helper functions which you can call per page for
enabling extra features (eg Table Helpers) or repetitive init code of various third party plugins.
This file is compiled from |
At the following section, we showcase various JS helpers for third party plugins. These are code snippets which init plugins' functionality in the related markup. We have created many helpers to let you init various plugins easily without repeating the same JS code over and over again in your pages.
Letâs have a better look at the core JavaScript libraries included with OneUI:
Letâs have a better look at the available pure JS plugins:
Letâs have a better look at the jQuery based plugins which require jQuery to work:
| Name | CSS | Helper | Version | Online |
|---|---|---|---|---|
| Bootstrap Colorpicker | 3.4.0 | |||
|
A nice and customizable colorpicker plugin for Bootstrap. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add
|
||||
| Bootstrap Datepicker | 1.9.0 | |||
|
A nice and customizable datepicker plugin for Bootstrap. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add
|
||||
| Bootstrap Maxlength | 1.10.1 | |||
|
This plugin integrates by default with Bootstrap using badges to display the maximum length of the field where the user is inserting text. Uses the HTML5 attribute "maxlength" to work. Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add
|
||||
| Bootstrap Notify | 3.1.3 | |||
|
Turns standard Bootstrap alerts into "Growl-like" notifications. Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage: Please check out the Notifications page under Components for usage examples. |
||||
| DataTables | 1.11.4 | |||
|
DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, and will add advanced interaction controls to any HTML table. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Usage: Please check out DataTables page under Tables for usage examples. |
||||
| Easy Pie Chart | 2.1.7 | |||
|
Easy Pie Chart is a lightweight plugin to draw simple, animated pie charts for single values. Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add
|
||||
| Ion Range Slider | 2.3.1 | |||
|
Easy, flexible and responsive range sliders. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add
|
||||
| jQuery Appear | 1.0.0 | |||
|
jQuery plugin to call a function when an element appears. We use it to make an element visible on scrolling. Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add data-* attributes to an element and the
You can also use more options:
|
||||
| jQuery Countdown | 2.2.0 | |||
|
The Final Countdown plugin for jQuery. Required JS files (include after all other JS scripts):
Usage: Please check out Coming Soon page for usage example. |
||||
| jQuery Sparkline | 2.4.1 | |||
|
This jQuery plugin generates sparklines (small inline charts) directly in the browser using data supplied either inline in the HTML, or via JavaScript. Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage:
Please check out Charts page under Components for more usage examples. |
||||
| jQuery Validation | 1.19.3 | |||
|
The jQuery Validation Plugin provides drop-in validation for your existing forms, while making all kinds of customizations to fit your application really easy. Required JS files (include after all other JS scripts):
Helper (call it before setting up your custom validation rules - it will load the default options for you):
Usage: Please check out Validation page under Forms for usage examples. |
||||
| jQuery Masked Input | 1.4.1 | |||
|
This is a masked input plugin for the jQuery JavaScript library. It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates, phone numbers, etc). Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (the helper inits various classes to work with): Please check out Plugins page under Forms for usage examples. |
||||
| jQuery Raty | 3.1.1 | |||
|
A star rating plugin. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Usage: Please check out Rating page under Components for usage examples. |
||||
| jVectorMap | 3.1.1 | |||
|
Vector Maps component. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Usage: Please check out Vector Maps page under Components for usage examples. |
||||
| Magnific Popup | 1.1.0 | |||
|
Light and responsive lightbox script with focus on performance. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (with Please check out Gallery page under Components for usage examples. |
||||
| Select2 | 4.0.13 | |||
|
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (add
|
||||
| Slick | 1.8.1 | |||
|
The last carousel you'll ever need. Required CSS files (include before main CSS):
Required JS files (include after all other JS scripts):
Helper (call it after all JS scripts are added):
Usage (with
Please check out Sliders page under Components for more usage examples. |
||||
| Vide | 0.5.1 | |||
|
Easy as hell jQuery plugin for video backgrounds. Required JS files (include after all other JS scripts):
Usage (set the url of your video in the
Note: If you are having issues with the auto video playback in Safari 11, please have a look at https://github.com/vodkabears/Vide/issues/206 |
||||
Finally, letâs have a better look at few custom helpers:
| Print Page |
|
A helper which prints the main content of the current page. Helper (just by calling the following function):
|
| Class Toggle |
|
A helper which allows you to toggle a custom class on the element of your choice on button click. Helper: This helper is already called by default on page load. You only must call it again if you inject new markup to the page and would like to init the functionality on it.
Usage: Your target element
Your button
In this specific example, each button click will toggle the class 'your-class' on the element with class 'js-target-class'. |
| Ripple |
|
A helper which animates a ripple on button click. Helper: This helper is already called by default on page load. You only must call it again if you inject new markup to the page and would like to init the functionality on it.
Usage (add data-* attributes to a button):
|
| Table Sections |
|
A helper which allows you to create table sections that toggle on row click (like an accordion component). Helper (call it after all JS scripts are added):
Usage:
1. Add the class
2. Use the following markup in your table to create clickable header rows and their content
Please check out Helpers page under Tables for usage examples. |
| Checkable Table |
|
A helper which allows you to create a table with checkable rows. Helper (call it after all JS scripts are added):
Usage:
1. Add the class
2. Use similar markup in your table to create checkable rows
Please check out Helpers page under Tables for usage examples. |
You can run multiple helpers in a page by using an array:One.helpers(['helper1', 'helper2', 'helper3']);
Alternatively, you can also use helpersOnLoad function to run them once DOM Content is loaded:One.helpersOnLoad(['helper1', 'helper2', 'helper3']);
Feel free to ignore the provided helpers and use your own plugin inits after youâve included the resources of the ones you need in your page.
When a helper is called and functionality/plugin is initialized, a class js-HELPER_NAME-enabled
is auto added to the element. This ensures that if you add a similar element dynamically to your page and
call the helper again, the functionality/plugin will be initialized only on the new element. Itâs a nice
convenient solution but please have in mind that if you copy-paste an element to your markup from your
browserâs developer tools, then you will also copy this extra class, so remember to remove it!
Laravel Starter Kit
Using it in an existing Laravel installation
If you already have your own Laravel app and would like to use OneUI in an existing installation, then you will just have to copy over the following folders/files:
-
public/-
fonts/* -
media/* -
js/lib/* -
js/plugins/*
-
-
resources/-
js/oneui/* -
js/pages/* -
sass/* -
views/*
-
-
routes/web.phpMigrate example routes
-
webpack.mix.jsMigrate asset compiling rules
Afterwards, just install the required npm dependencies by running the following console command..
npm i bootstrap@^5 @popperjs/core@^2 simplebar@^5 && npm i browser-sync browser-sync-webpack-plugin sass sass-loader -D
..and finally run npm run dev to compile all assets.
Blade Templates
The provided Blade Templates under resources/views/ folder have everything you need to recreate
any demo page we showcase in the PHP and HTML versions. If you are not familiar with Blade Templates, you can
have a look at the official docs where they explained in
detail. They can help us in many ways but most importantly, they enable us to create master layouts, so that
we donât repeat the same content in each one of our pages.
Blade Layout Templates
First of all, itâs important to know that we provide 2 main layouts, the simple and the backend layout. As you must have already seen from the HTML Structure section, the simple layout is actually just a subset of the backend layout (the main structure). It is the same layout without a header, sidebar, side overlay and footer.
| Files | Description |
|---|---|
resources/views/layouts/simple.blade.php
|
This is the simple layout which is ideal to recreate the one-page layout pages such as Sign In or
Error pages. A page example using this layout can be found at
|
resources/views/layouts/backend.blade.php
|
This is the backend layout which includes all main elements (header, sidebar, side overlay and
footer) and it is ideal for recreating full backend pages. A page example using this layout can be
found at |
Before adding your own pages, you can create your custom layout based on your preferences or use the existing
ones to recreate any layout you want. You will just have to find the page from the HTML version with the
layout you are interested in, use the same classes used in #page-container element and replace
the HTML content of the main sections (header, sidebar, side overlay and footer) by copying over the HTML
markup you find in each related element.
Recreating a page from the HTML version
It is a simple process and we provide related page examples for each occasion under
resources/views/pages/ folder. Letâs have a better look:
-
Static content (example in
blank.blade.php)If the page you are interested in doesnât use plugins, you will have to:
-
Copy over the HTML markup found in your
#main-containerelement to your@section('content')section.
-
Copy over the HTML markup found in your
-
Static content with a plugin using a JS helper (example in
slick.blade.php)If the page you are interested in uses plugins for which we provide JS helpers, you will have to:
-
Copy over the HTML markup found in your
#main-containerelement to your@section('content')section. -
Include pluginsâ required CSS assets in your
@section('css_before')section. -
Include pluginsâ required JS assets and run the JS helper in your
@section('js_after')section.
-
Copy over the HTML markup found in your
-
Static content with a plugin using custom JS init code (example in
datatables.blade.php)If the page you are interested in uses plugins for which you have to use custom JS to init it, you will have to:
-
Copy over the HTML markup found in your
#main-containerelement to your@section('content')section. -
Include pluginsâ required CSS assets in your
@section('css_before')section. -
Include pluginsâ required JS assets in your
@section('js_after')section. -
Copy over the JS init code (found under
assets/_js/pages/folder) used in the page from the HTML version, in theresources/js/pages/folder and add it in yourwebpack.mix.jsfile to be compiled with Laravel Mix (eg.js('resources/js/pages/tables_datatables.js', 'public/js/pages/tables_datatables.js')). Afterwards, include it in your@section('js_after')section and edit it accordingly based on your preferences.
-
Copy over the HTML markup found in your
You can have a look at the JavaScript Structure section where we include info about all integrated plugins, their required assets and their JS helper availability. Moreover, itâs worth mentioning that if you are more experienced, you could use dynamic imports which is a method of code-splitting and enables us to split JavaScript code into separate files.
Quick Tips
Wrapping #page-container
If you would like to wrap the main layout div#page-container with another div, then you should
add the class hero-static to your wrapping div element to ensure that the flexbox layout will keep
working as expected and your main elements (eg footer), will be positioned accordingly.
CSS prefixes for older browsers
You can update the following array in package.json accordingly if you would like the Autoprexifer
to auto add CSS prefixes for older browser versions (when using the Gulp tasks to compile from Sass to CSS).
By default, we use the same as Bootstrap 5 does.
"browserslist": [
">= 0.5%",
"last 2 major versions",
"not dead",
"Chrome >= 60",
"Firefox >= 60",
"Firefox ESR",
"iOS >= 12",
"Safari >= 12",
"not Explorer <= 11"
]
High resolution screens
The UI will look crispy clear on high resolution screens and if you would like your images to look great, too,
then you will have to use the srcset attribute of the <img> element. For
example, if you have an image url/to/image.jpg and its high resolution version
url/to/image@2x.jpg, you will have to use the following markup:
<img src="url/to/image.jpg" srcset="url/to/image@2x.jpg 2x" alt="Image Description">
The browser will auto select the best version and load it accordingly. Older browsers will ignore the
srcset attribute and will load the regular image as usual.
Demo Forms
Please remember to remove onsubmit="return false;" from <form> tags
if you are using a form from the example pages. It is just added to prevent forms from submitting in case you
click on a submit button while previewing the pages.
Favicons
If you would like to auto create your favicons from your image/logo, you can use the free service over at http://realfavicongenerator.net
Credits
Weâve used the following resources as listed. Special thanks to all the authors for their hard work!
| Frameworks |
|---|
| Bootstrap |
| Photos |
|---|
| MyPhotoPack |
| Unsplash |
| Videos |
|---|
| Pexels |
| Icons |
|---|
| Font Awesome 6 |
| Simple Line Icons |
Thank You!
Thank you so much for supporting our work by choosing one of our products! We wish you all the best with your upcoming projects and endeavors in life! If you would like to check out more of our work, be sure to visit our website.
Have a great day and happy coding!